/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.sequence.preference;

import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FontFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.cea.papyrus.diagram.sequence.Activator;


/**
 * Preference page for Gate
 * 
 * @author ymortier <yann.mortier@obeo.fr>
 */
public class GatePreferencePage extends FieldEditorPreferencePage implements
        IWorkbenchPreferencePage {

    /**
     * Creates a new <code>GatePreferencePage</code>.
     */
    public GatePreferencePage() {
        super(GRID);
        setPreferenceStore(Activator.getDefault().getPreferenceStore());
        setDescription("Gate Preferences");
    }

    /**
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
     */
    @Override
    protected void createFieldEditors() {
        addField(new ColorFieldEditor(
                SequenceDiagramPreferenceConstants.P_GATE_BACKGROUNDCOLOR, "Background Color",
                getFieldEditorParent()));
        addField(new ColorFieldEditor(SequenceDiagramPreferenceConstants.P_GATE_BORDERCOLOR,
                "Border Color", getFieldEditorParent()));
        addField(new ColorFieldEditor(SequenceDiagramPreferenceConstants.P_GATE_FONTCOLOR,
                "Font Color", getFieldEditorParent()));
        addField(new FontFieldEditor(SequenceDiagramPreferenceConstants.P_GATE_FONT, "Font",
                getFieldEditorParent()));
    }

    /**
     * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
     */
    public void init(IWorkbench workbench) {
    }

}
